<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix='sec' uri='http://www.springframework.org/security/tags'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript" src="scripts/boot.js"></script>
<style type="text/css">
	.item{
		width: 135px;
		display: inline-block;
		margin-left: 5px;
	}
</style>
</head>
<body style="border: 0px; margin: 0px; padding: 0px;width: 100%;height: 100%">
<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
    <table style="width:100%;">
        <tr>
            <td style="width:30%;">
               <span class="item"> 审核时间（开始时间）：</span>
               <input emptyText="请选择..." format="yyyy-MM-dd H:mm:ss" id="start_time" class="mini-datepicker" timeformat="H:mm:ss" showTime="true" style="width: 160px" allowInput="false"/>
            </td>  
            <td style="width:30%;">
               <span class="item"> 审核时间（结束时间）：</span>                        
               <input emptyText="请选择..." id="end_time" format="yyyy-MM-dd H:mm:ss" class="mini-datepicker" timeformat="H:mm:ss" showTime="true" style="width: 160px" allowInput="false"/>   
            </td>
            <td style="display: inline-block;"> 
               <a class="mini-button" iconCls="icon-search" onclick="search()">查询</a>
            </td>
        </tr>
    </table>        
</div>
<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
	    <table style="width:100%;">
	        <tr>
	            <td style="width:100%;">
	            	<sec:authorize url='/pro_sales_stat_expots.do'>
                  	<a class="mini-button" iconCls="icon-ok" onclick="exportAllData()">导出所有</a>
                  	</sec:authorize>
            		<span style="color: #f00;">未核过比例 = 未核过单数/核单总数</span>
            	</td>
	        </tr>
	    </table>           
	</div>
<div class="mini-fit" >
	<div id="datagrid0921" class="mini-datagrid" idField="id" pageSize="20" multiSelect="true"
		url="check_user_orders_sta_view.do" style="width:100%;height: 100%">
		<div property="columns">
			<div type="indexcolumn"></div>
			<div field="checkUserName" width="120" headerAlign="center" align="center">审核人员</div>
			<div field="totalCheckCount" width="120" headerAlign="center" align="center">核单总数</div>
			<div field="checkPass" width="120" headerAlign="center" align="center">已核过单数</div>
			<div field="checkNoPass" width="80" headerAlign="center" align="center">未核过单数</div>
			<div field="checkInvalid" width="80" headerAlign="center" align="center">无效单数</div>
			<div field="checkCancel" width="80" headerAlign="center" align="center">取消单数</div>
			<div field="NoPassProportion" width="80" headerAlign="center" numberFormat="p" align="center">未核过比例</div>
		</div>
	</div>
</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid0921");

grid.load();

function search() {
	var startTime = mini.get("start_time");
	var endTime = mini.get("end_time");
	grid.load({startTime: startTime.getFormValue(), endTime: endTime.getFormValue()});
}

function onKeyEnter(e) {
    search();
}

//导出全部
function exportAllData(){
	var startTime = mini.get("start_time").getFormValue();
	var endTime = mini.get("end_time").getFormValue();
	window.location.href="pro_sales_stat_expots.do?stime="+startTime+"&etime="+endTime; 
}
</script>
</body>
</html>